<label id="labelUser" style="font-weight: bold;"><?php echo $this->res_ped[0]["caf01_user"]; ?></label>
<br />
<?php echo date("d/m/Y H:i"); ?>
<br />
<label id="labelTable" style="font-size: 24px;">Mesa <?php echo $this->res_ped[0]["caf02_mesa"]; ?></label>
<label id="labelPax" style="font-size: 16px; margin-left: 80px;">Pax <?php echo $this->res_ped[0]["caf02_group"]; ?></label>

<hr style="margin: 5px 0 5px 0;" />

<table width="100%" style="font-size: 12px;" cellspacing="0" cellpadding="0">
	<?php 
	
	$total_geral = 0;
	$auxMenu = 0;
	
	if(!$this->arr_pedido)
	{
		echo "<tr><td><i>Nenhum produto adicionado.</i><td><tr>";
	}
	
	foreach ($this->arr_pedido as $key => $val)
	{
		$total_prod  = $val["caf05_valor"] * $val["caf04_qtd"];
		$total_geral += $total_prod;
		
		if($auxMenu != $val['caf05_cod_menu'] && $auxMenu)
		{
			echo "<tr><td colspan='4'><div style='height: 5px;'></div></td></tr>";
		}
	?>
		<tr>
			<td width="1%" valign="top">
				<?php echo $val["caf04_qtd"]; ?>&nbsp;
			</td>
			<td>
				<?php echo "{$val["caf05_prod"]}({$val["caf05_car"]})"; ?>
				<div style="margin-left: 10px; font-weight: bold; text-align: justify;"><i><?php echo $val["caf04_coment"]; ?></i></div>	
			</td>
			<td width="1%" valign="top">
				$<?php echo $val["caf05_valor"]; ?>/un.&nbsp;&nbsp;
			</td>
			<td width="1%" valign="top">
				$<?php echo $total_prod; ?>	
			</td>
		</tr>
	<?
		$auxMenu = $val['caf05_cod_menu'];
	}
	
	?>
</table>
<hr style="margin: 5px 0 5px 0" />
<div style="float: left; font-size: 12px;">
	Total
</div>
<div style="text-align: right; font-size: 12px;">
	$<?php echo $total_geral; ?>
</div>